import request from '@/utils/request'
import apis from './'

export function getReceive () {
  return request({
    url: apis.GetReceive,
    method: 'get'
  })
}

export function getAddReceive () {
  return request({
    url: apis.AddReceive,
    method: 'get'
  })
}

export function postAddReceive (data) {
  return request({
    url: apis.AddReceive,
    method: 'post',
    data: data
  })
}

export function getEditReceive (id) {
  return request({
    url: `${apis.EditReceive}?id=${id}`,
    method: 'get'
  })
}

export function postEditReceive (id, data) {
  return request({
    url: `${apis.EditReceive}?id=${id}`,
    method: 'post',
    data: data
  })
}

export function getReceive0 (parameter) {
  return request({
    url: apis.GetReceive0,
    method: 'get',
    params: parameter
  })
}
export function getAddReceive0 () {
  return request({
    url: apis.AddReceive0,
    method: 'get'
  })
}

export function postAddReceive0 (data) {
  return request({
    url: apis.AddReceive0,
    method: 'post',
    data: data
  })
}

export function delReceive0 (id) {
  return request({
    url: `${apis.DelReceive0}?id=${id}`,
    method: 'get'
  })
}

export function getReceiveSetting () {
  return request({
    url: apis.ReceiveGeneral,
    method: 'get'
  })
}

export function postReceiveSetting (data) {
  return request({
    url: apis.ReceiveGeneral,
    method: 'post',
    data: data
  })
}
